package com.tang;

import com.tang.entity.BaseUserRole;
import com.tang.mapper.BaseUserRoleMapper;
import com.tang.service.IBaseUserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;

public class TestDao implements ApplicationListener<ContextRefreshedEvent> {

    @Autowired
    IBaseUserRoleService baseUserRoleService;

    @Autowired
    BaseUserRoleMapper baseUserRoleMapper;

    @Override
    public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) {
        System.out.println(baseUserRoleService);
        System.out.println(baseUserRoleService.list());
        System.out.println(baseUserRoleService.getById("1"));
        System.out.println(baseUserRoleMapper.test());

        System.out.println(baseUserRoleService.lambdaQuery().eq(BaseUserRole::getId, "1").list());
    }
}
